﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="废料_KC.aspx.cs" Inherits="syc.Store.废料_KC" %>

<head runat="server">
    <title></title>
</head>
<body>
    <script type="text/javascript" language="javascript" src="/common.js"></script>

    <form id="form1" runat="server">
       <div id="wintop" class="wintop">库存查询<br />
<asp:Label ID="SqlText" runat="server" Text="" Visible="false"></asp:Label>
       </div>
       <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
onselected="SqlDataSource1_Selected" 
ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>"></asp:SqlDataSource>

<asp:SqlDataSource ID="SqlDataSource2" runat="server" 
    ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
    SelectCommand="select 0 as ID,'全部' as 名称 union SELECT [ID], [名称] FROM [废料收货单位]"></asp:SqlDataSource>

       <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
SelectCommand="select 0 as ID,'全部' as 废料名称 union select ID, 废料名称 FROM 废料"></asp:SqlDataSource>
<asp:Panel ID="Panel2" runat="server" CssClass="panel" GroupingText="库存查询">
    废&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 料：<asp:DropDownList ID="LeiBie" runat="server" 
        DataSourceID="SqlDataSource3" Width="140px"
        DataTextField="废料名称" DataValueField="ID" style="height: 22px">
    </asp:DropDownList>
<span style="margin-left:8px;"></span> 填报单位：<asp:DropDownList ID="FenChang" runat="server" Width="121px">
        <asp:ListItem Text="全部" Value="0"></asp:ListItem>
        <asp:ListItem Text="一分厂" Value="1"></asp:ListItem>
        <asp:ListItem Text="二分厂" Value="2"></asp:ListItem>
        <asp:ListItem Text="三分厂" Value="3"></asp:ListItem>
        <asp:ListItem Text="四分厂" Value="4"></asp:ListItem>
        <asp:ListItem Text="五分厂" Value="5"></asp:ListItem>
    </asp:DropDownList>
<span style="margin-left:8px;"></span> 收货单位：<asp:DropDownList ID="ShouHuoDanWei" 
        runat="server" Width="121px" DataSourceID="SqlDataSource2" DataTextField="名称" 
        DataValueField="ID">
        </asp:DropDownList> 
<div style="font-size:6px;height:6px;line-height:6px;"></div>
    起始日期：<asp:TextBox ID="Date1" runat="server" CssClass="textbox" Width="105px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date1').value, document.getElementById('Date1'));" />
<span style="margin-left:10px;"></span>截止日期：<asp:TextBox ID="Date2" runat="server" CssClass="textbox" Width="105px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date2').value, document.getElementById('Date2'));" />

<span style="margin-left:10px;"></span><asp:Button ID="Button_Query" runat="server" Text="查 询" UseSubmitBehavior="false" 
        CssClass="mbutton" onclick="Button_Query_Click" />
        
<asp:Button ID="Button_Reset" runat="server" Text="清空条件" UseSubmitBehavior="false" 
        CssClass="mbutton" onclick="Button_Reset_Click" />
</asp:Panel>
    <div class="gridframe">
        <div class="gridview">
        
            <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#e5cfab">
	            <tr>
		            <td class="grid-title">废料库存信息</td>
		        </tr>
		        <tr>
		            <td class="grid-back">                        
                        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                            AutoGenerateColumns="False" CssClass="grid" 
                            DataSourceID="SqlDataSource1" 
                            GridLines="None" ondatabound="GridView1_DataBound" 
                            onpageindexchanged="GridView1_PageIndexChanged" AllowSorting="True" 
                            UseAccessibleHeader="False">
                            <PagerSettings Visible="False" />
                            <RowStyle CssClass="grid-row-normal" />
                           <Columns>
                            <asp:TemplateField HeaderText="">
                                <ItemTemplate>
                                    <asp:Image ID="Image_icon" runat="server" ImageUrl="/Icons/online.gif" />
                                </ItemTemplate>
                                <HeaderStyle CssClass="grid-header" />
                                <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="20px" />
                            </asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="编码">
                                <ItemTemplate>
                                    <asp:Label ID="Label_bm" runat="server" Text='<%# Eval("废料ID","{0:D10}") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="grid-header" />
                                <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="90px" />
                            </asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="废料名称">
                                <ItemTemplate>
                                    <asp:Label ID="Label_pm" runat="server" Text='<%# Eval("废料名称") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="grid-header" />
                                <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="120px" />
                            </asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="规格">
                                <ItemTemplate>
                                    <asp:Label ID="Label_gg" runat="server" Text='<%# Eval("规格") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="grid-header" />
                                <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="120px" />
                            </asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="单位">
                                <ItemTemplate>
                                    <asp:Label ID="Label_dw" runat="server" Text='<%# Eval("单位") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="grid-header" />
                                <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="60px" />
                            </asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="入库">
                                <ItemTemplate>
                                    <asp:Label ID="Label_rk" runat="server" Text='<%# Eval("入库") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="grid-header" />
                                <ItemStyle CssClass="grid" HorizontalAlign="right" Width="80px" />
                            </asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="出库">
                                <ItemTemplate>
                                    <asp:Label ID="Label_ck" runat="server" Text='<%# Eval("出库") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="grid-header" />
                                <ItemStyle CssClass="grid" HorizontalAlign="right" Width="80px" />
                            </asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="结存">
                                <ItemTemplate>
                                    <asp:Label ID="Label_jcsl" runat="server" Text='<%# Eval("结存") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="grid-header" />
                                <ItemStyle CssClass="grid" HorizontalAlign="right" Width="100px" />
                            </asp:TemplateField>
                        </Columns>
                          <SelectedRowStyle CssClass="grid-row-selected" />
                          </asp:GridView>
		            </td>
	            </tr>
	           <tr>
	            <td>   
	                <table width="100%">
	                    <tr>
	                        <td class="pagebar">
                                <asp:Button ID="Button_Pager_First" UseSubmitBehavior="false" runat="server" Text="" ToolTip="首页" 
                                    CssClass="pageturn-first-b" onclick="Pager_Click" CommandName="--" />
                                <asp:Button ID="Button_Pager_Prev" UseSubmitBehavior="false" runat="server" Text="" ToolTip="上一页" 
                                    CssClass="pageturn-prev-b" onclick="Pager_Click" CommandName="-" />
                                <input type="button" class="page-split" UseSubmitBehavior="false" disabled />第<asp:TextBox 
                                    ID="TextBox_Pager" AutoPostBack="True" runat="server" CssClass="pageturn" 
                                    ontextchanged="Pager_Click"></asp:TextBox>页<input type="button" class="page-split" disabled /><asp:Label ID="Label_Pages" UseSubmitBehavior="false" runat="server"></asp:Label><input type="button" class="page-split" disabled />
                                
                                <asp:Button ID="Button_Pager_Next" UseSubmitBehavior="false" runat="server" Text="" ToolTip="下一页" 
                                    CssClass="pageturn-next-b" onclick="Pager_Click" CommandName="+" />
                                <asp:Button ID="Button_Pager_Last" UseSubmitBehavior="false" runat="server" Text="" ToolTip="末页" 
                                    CssClass="pageturn-last-b" onclick="Pager_Click" CommandName="++" /><asp:Label ID="Label9" runat="server"></asp:Label><input type="button" class="page-split" disabled />
                            </td>
                            <td class="pagebar" align="right">
                                <asp:Label ID="Label_Total" runat="server"></asp:Label>
                            </td>
                        </tr>
                   </table>

	            </td>
            </tr>
        </table>
            

        </div>
    </div>
    
    </form>
<script>
    var textboxs = document.getElementsByTagName("input");
    var i;
    for (i = 0; i < textboxs.length; i++) {
        if (textboxs[i].className == "textbox") {
            textboxs[i].onchange = function(e) { this.className = "textbox-changed"; };
            textboxs[i].onfocus = function(e) { this.select(); };
        }
        else if (textboxs[i].className == "pageturn" || textboxs[i].className == "intxt1" || textboxs[i].className == "intxt2") {
            textboxs[i].onfocus = function(e) { this.select(); };
        }

    }
    var rows = document.getElementsByTagName("tr");
    for (i = 0; i < rows.length; i++) {

        if (rows[i].className == "grid-row-normal") {
            rows[i].onmouseover = function() { this.className = "grid-row-bright"; };
            rows[i].onmouseout = function() { this.className = "grid-row-normal"; };
        }
    }
    var tds = document.getElementsByTagName("td");
    for (i = 0; i < tds.length; i++) {
        if (tds[i].className == "detailheader") {
            tds[i].innerHTML = tds[i].innerHTML.replace("*", "<span class=required>*</span>");
        }
    }
</script>
</body>
</html>
